// 主逻辑控制
        document.addEventListener('DOMContentLoaded', () => {
            // 初始化播放列表
            renderPlaylist(playlist);
            
            // 初始化音频播放器
            const audioPlayer = new AudioPlayer();
            audioPlayer.init();
            
            // 标签切换逻辑
            const playlistTab = document.getElementById('playlist-tab');
            const lyricsTab = document.getElementById('lyrics-tab');
            const playlistContainer = document.getElementById('playlist-container');
            const lyricsContainer = document.getElementById('lyrics-container');
            
            playlistTab.addEventListener('click', () => {
                playlistTab.classList.add('text-white', 'border-purple-500');
                playlistTab.classList.remove('text-gray-400');
                lyricsTab.classList.add('text-gray-400');
                lyricsTab.classList.remove('text-white', 'border-purple-500');
                playlistContainer.classList.remove('hidden');
                lyricsContainer.classList.add('hidden');
            });
            
            lyricsTab.addEventListener('click', () => {
                lyricsTab.classList.add('text-white', 'border-purple-500');
                lyricsTab.classList.remove('text-gray-400');
                playlistTab.classList.add('text-gray-400');
                playlistTab.classList.remove('text-white', 'border-purple-500');
                playlistContainer.classList.add('hidden');
                lyricsContainer.classList.remove('hidden');
            });
            
            // 封面图点击切换到歌词
            const albumContainer = document.getElementById('album-container');
            albumContainer.addEventListener('click', () => {
                if (playlistContainer.classList.contains('hidden')) {
                    // 当前是歌词页，切换到播放列表
                    playlistTab.click();
                } else {
                    // 当前是播放列表，切换到歌词
                    lyricsTab.click();
                }
            });
        });
    